{% set pypi_name = 'dib-utils' %}
{% set upstream_version = upstream_version('0.0.11') %}
{% set rpm_release = '1' %}
{% set source = url_pypi() %}

Name:           {{ py2name('dib-utils', py_versions='py3') }}
Version:        {{ py2rpmversion() }}
Release:        {{ py2rpmrelease() }}
Summary:        Pieces of diskimage-builder that are useful standalone
License:        {{ license('Apache-2.0') }}
Group:          Development/Languages/Python
URL:            https://docs.openstack.org/{{ pypi_name }}
Source0:        {{ source }}
BuildRequires:  openstack-macros
BuildRequires:  {{ py3('pbr') }}
BuildArch:      noarch

%description
Pieces of diskimage-builder that are useful standalone.
This allows them to be used without pulling in all of
diskimage-builder and its dependencies.

%prep
%autosetup -n {{ pypi_name }}-{{ upstream_version }}
%py_req_cleanup

%build
%{py3_build}

%install
%{py3_install}

%check
tests/run_tests.sh

%files
%license LICENSE
%doc README.md
%{_bindir}/dib-run-parts
%{python3_sitelib}/*.egg-info

%changelog
